var t = getApp();

Page({
    data: {
        list: [],
        current_page: 1,
        last_page: 1
    },
    link: function(t) {
        var a = t.currentTarget.dataset.item;
        console.log(a), wx.navigateTo({
            url: "/packageF/sign_in_subscribe/sign_in_subscribe_user_detail/sign_in_subscribe_user_detail?id=" + a.id
        });
    },
    getData: function() {
        var a = this;
        t._getNetWork({
            url: t.getNetAddresss("plugin.sign-buy.frontend.valid-user.index"),
            success: function(e) {
                var n = e.data, s = n.result, i = n.msg, r = n.data;
                if (0 == s) return t.tips(i);
                a.setData({
                    current_page: r.current_page,
                    last_page: r.last_page,
                    list: r.data
                });
            }
        });
    },
    onLoad: function(t) {
        this.getData();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        var a = this;
        if (!(this.data.current_page >= this.data.last_page)) {
            var e = this.data.current_page + 1;
            t._getNetWork({
                url: t.getNetAddresss("plugin.sign-buy.frontend.valid-user.index"),
                data: {
                    page: e
                },
                success: function(e) {
                    var n = e.data, s = n.result, i = n.msg, r = n.data;
                    if (0 == s) return t.tips(i);
                    a.setData({
                        current_page: r.current_page,
                        last_page: r.last_page,
                        list: a.data.list.concat(r.data)
                    });
                }
            });
        }
    },
    onShareAppMessage: function() {}
});